CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(OSProject C)

set(CMAKE_C_FLAGS_RELEASE "-Wall -Wextra")
set(CMAKE_C_FLAGS_DEBUG "-g -D=DEBUG -Wall -Wextra")

ENABLE_TESTING()

INCLUDE_DIRECTORIES(.)

ADD_LIBRARY(libthread.a STATIC
  thread.c
  list.c
  clock.c
  mutex.c
  mutex2.c
  sem.c
  sem2.c
  stackProtector.c
)

ADD_EXECUTABLE(example
  example.c)

TARGET_LINK_LIBRARIES(example
  libthread.a)

ADD_SUBDIRECTORY(test)
